//
//  SJLocationManager.h
//  ProjectForBD
//
//  Created by Jaesun on 17/5/23.
//  Copyright © 2017年 B.D. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <CoreLocation/CoreLocation.h>

typedef void(^SJLocationCompleteBlock)(BOOL success, CLLocation *newLocation);

typedef void(^SJLocationReverseGeocodeBlock)(BOOL success, CLPlacemark *placemark);

typedef void(^SJLocationPlacemarkBlock)(BOOL success, CLPlacemark *placemark);

@interface SJLocationManager : NSObject<CLLocationManagerDelegate>

// 定位服务
@property (nonatomic, strong) CLLocationManager *locationManager;

@property (nonatomic, strong) SJLocationCompleteBlock locationCompleteBlock;
@property (nonatomic, strong) SJLocationReverseGeocodeBlock locationReverseGeocodeBlock;

@property (nonatomic, strong) SJLocationPlacemarkBlock locationPlacemarkBlock;

+ (instancetype)shareManager;

// 定位
- (void)updateLoactionWithComplete:(SJLocationCompleteBlock)locationCompleteBlock;
// 反编码
- (void)reverseGeocodeWithCLLocation:(CLLocation *)location Complete:(SJLocationReverseGeocodeBlock) locationReverseGeocodeBlock;

@end
